home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr10 / 184_01.zip / H19BD.L < prev    next >
Text File  |  1993-06-13  |  2KB  |  115 lines

  1. /* Heath H-19 terminal specific routines */
  2. gotoxy(x,y)
  3. /* position cursor at line y column x */
  4. char x,y;
  5. {
  6.     putchar(ESC);
  7.     putchar('Y');
  8.     putchar(y+32);
  9.     putchar(x+32);
  10. }
  11. getxy(x,y)
  12. /* get the current cursor line and column */
  13. char *x,*y;
  14. {
  15.     char c;
  16.  
  17.     putchar(ESC);
  18.     putchar('n');
  19.     while ((c=bdos(6,255)) == 0) ;
  20.     while ((c=bdos(6,255)) == 0) ;
  21.     while ((*y=bdos(6,255)) == 0) ;
  22.     while ((*x=bdos(6,255)) == 0) ;
  23.     *y -= 32;
  24.     *x -= 32;
  25. }
  26. savexy()
  27. /* issue the heath cursor save command */
  28. {
  29.     putchar(ESC);
  30.     putchar('j');
  31. }
  32. restxy()
  33. /* restore the heath cursor saved with savexy() */
  34. {
  35.     putchar(ESC);
  36.     putchar('k');
  37. }
  38. clear()
  39. /* clear the screen and home cursor */
  40. {
  41.     putchar(ESC);
  42.     putchar('E');
  43. }
  44. delline()
  45. /* delete the line the cursor is on and move it to far left */
  46. {
  47.     putchar(CR);
  48.     deol();
  49. }
  50. deol()
  51. /* delete to end of line */
  52. {
  53.     putchar(ESC);
  54.     putchar('K');
  55. }
  56. revvid()
  57. /* enter heath reverse video mode */
  58. {
  59.     putchar(ESC);
  60.     putchar('p');
  61. }
  62. norvid()
  63. /* enter heath normal video mode */
  64. {
  65.     putchar(ESC);
  66.     putchar('q');
  67. }
  68. termset()
  69. /* set up the terminal to operate */
  70. {
  71.     putchar(ESC);
  72.     putchar('t');        /* keyboard shifted */
  73.     putchar(ESC);
  74.     putchar('y');
  75.     putchar('5');        /* cursor on */
  76.     putchar(ESC);
  77.     putchar('x');
  78.     putchar('4');        /* block cursor */
  79.     putchar(ESC);
  80.     putchar('y');
  81.     putchar('8');        /* no auto-LF */
  82.     putchar(ESC);
  83.     putchar('y');
  84.     putchar('9');        /* no auto-CR */
  85. }
  86. termreset()
  87. /* reset terminal to whatever the power-up mode was */
  88. {
  89.     int i;
  90.  
  91.     putchar(ESC);
  92.     putchar('z');        /* back to power-up config */
  93.  
  94.     for (i=0; i<20; i++)    /* send nulls to allow terminal */
  95.         putchar('\0');    /* time to initialize itself    */
  96. }
  97. hinchar()
  98. /* input characters and translate the heath ESC sequences *
  99.  * into one character as character + 128                  */
  100. {
  101.     char c;
  102.  
  103.     while ((c = bdos(6,255)) == 0) /* do nothing */ ;
  104.     if (c == ESC) {
  105.               while ((c=bdos(6,255))==0);
  106.               return(c+128);
  107.                       }
  108.     else    return(c);
  109. }
  110. /* #endif */
  111. C) {
  112.               while ((c=bdos(6,255))==0);
  113.               return(c+128);
  114.                       }
  115.     else    return(